Aligned normal_lccdf and std_normal_lccdf with the lcdf functions - #3363
Aligned normal_lccdf and std_normal_lccdf with the lcdf functions#3363jaburgoyne wants to merge 1 commit into
Conversation
|
Fyi our backend CI is migrating to a new server cluster so the jenkins will hiccup for a minute while we get everything settled |
|
It looks like your changes exposed an issue in the opencl code. Let me look into this |
|
@jaburgoyne this is interesting, for the tests it looks like there may be an autodiff issue with using the symmetry trick here (which implies there is something wrong with our code that your code is showing us). At ./test/unit/math/expect_near_rel.hpp:90: Failure
Value of: stan::math::is_nan(x1) && stan::math::is_nan(x2)
Actual: false
Expected: true
expect_near_rel(0, nan)
expect_near_rel; require items x1(0, 0) = x2(0, 0): hessian() Hessian for finite_diff vs fvar<var>
./test/unit/math/expect_near_rel.hpp:90: Failure
Value of: stan::math::is_nan(x1) && stan::math::is_nan(x2)
Actual: false
Expected: true
expect_near_rel(0, nan)
expect_near_rel; require items x1(0, 0) = x2(0, 0): hessian_fvar() Hessian for finite_diff vs fvar<fvar<double>>
[ FAILED ] AgradRev.mathMixScalFun_normal_lccdf (1 ms)This passed at |
Summary
This pull request addresses #1985 by updating
normal_lccdfandstd_normal_lccdfto callnormal_lcdfandstd_normal_lcdfwith the signs ofxandmureversed.Tests
The tests have been updated to use the latest values of
pnormin R 4.6.1. These are more direct tests than the previous versions, which worked via anexpcall, somewhat defeating the purpose of having separatelcdfandlccdffunctions.Side Effects
None.
Release notes
normal_lccdfandstd_normal_lccdfupdated to usenormal_lcdfandstd_normal_lcdfimplementationsChecklist
Copyright holder: John Ashley Burgoyne
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit)make test-headers)make test-math-dependencies)make doxygen)make cpplint)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested